The subject matter of this application is directed to video stabilization and, particularly, to applying a correction transform to a frame based on estimated motion of the frame.
Video stabilization can be achieved by capturing a larger image than the image displayed, thereby creating a buffer of pixels around the edge of the displayed image. Then once the shift between frames is calculated, a frame is shifted and sometimes transformed to compensate for the detected motion.
If the captured image does not have an extra buffer of pixels, the image may be transformed to correct for motion and cropped, and then scaled to fit the original image size. Scaling the cropped image into the regular frame often requires extrapolation of pixels at the borders. This may result in visible artifacts at the edges of the frames.
The identified transform may also be outside the limit of the captured image. If the identified transform is applied to the image, the transformed image would fall outside the borders of the captured image (e.g., outside the buffer of pixels around the edge of the displayed image). Existing video stabilization methods change the transform to fit within the image border by trial and error, or even do not apply transform when the candidate transform is outside the cropping region. Additionally, for frames with a transform outside the boundary of the image, correcting the transform to fit within the boundary of the frame image using conventional methods may result in an improper transform and result in a visible transition between frames.
Accordingly, the inventors have identified a need in the art to determine a video stabilization transform that is within the boundary of the captured image frame.